/*
 * @Autor: dingxiaolin
 * @Date: 2021-06-02 16:36:24
 * @LastEditors: dingxiaolin
 * @LastEditTime: 2021-07-18 09:35:50
 */
import lStorage from '@/utils/lStorage'
export const mutations = {
    toggleTheme: (state, v) => {
        state.theme = v
        lStorage.set('theme', v)
    },
    toggleColor: (state, v) => {
        state.color = v;
        lStorage.set('color', v);
        (window as any).less.modifyVars({
            '@primary-color': v
        })
    },
    toggleLayoutMode: (state, v) => {
        state.mode = v;
        lStorage.set('mode', v);
    },
    toggleContentWidth: (state, v) => {
        state.contentWidth = v;
        lStorage.set('contentWidth', v);
    },
    toggleFixedHeader: (state, v) => {
        state.fixedHeader = v;
        lStorage.set('fixedHeader', v);
    },
    toggleShowBread: (state, v) => {
        state.showBread = v;
        lStorage.set('showBread', v);
    },
    toggleMultiTab: (state, v) => {
        state.multiTab = v;
        lStorage.set('multiTab', v);
    },
    toggleWeak: (state, v) => {
        state.weak = v;
        lStorage.set('weak', v);
    },
    toggleOpen: (state, v) => {
        state.openAll = v;
        lStorage.set('openAll', v);
    },
}
